package kafkastudy.spring;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * Created by hp on 2019/7/26.
 */
@Component
public class KafkaConsumerAnnotationSerivce {

    @KafkaListener(topics = "xmine")
    void templarAgreementNoticewithhold(ConsumerRecord<String, String> data) {
        //消费业务逻辑

        System.out.println("key:"+data.key()+"value:"+data.value());
    }
}
